import React, { Component } from "react";
import MyHeader from "../../../common/my-header/myheader"
import styles from "./Us.module.scss"
import {renderRoutes} from "react-router-config";

class Us extends Component {
    handleReturn=(params)=>{
        this.props.history.push("/my");
    }
    handleUserHttp=()=>{
      this.props.history.push("/my/us/userHttp");
    }
    handlePriHttp=()=>{
      this.props.history.push("/my/us/riHttp");
    }
  render() {
    return (
     <div className={styles.wrapper}>
         <div className={styles.aboutUs}>
             {/* 标题 */}
             <div onClick={this.handleReturn}>
                 <MyHeader title="关于我们"></MyHeader>
             </div>
             {/* 正文 */}
             <div className={styles.aboutUsContent}>
                 <div className={styles.contact}>
                     <div className={styles.left}>联系我们</div>
                     <div className={styles.right}>0371-68698031</div>
                 </div>
                 <div className={styles.useHttp} onClick={this.handleUserHttp}>
                     <div className={styles.left}>用户协议</div>
                     <div className={styles.right}>
                         <i className="iconfont icon-youjiantou"></i>
                     </div>
                 </div>
                 <div className={styles.priHttp} onClick={this.handlePriHttp}>
                     <div className={styles.left}>隐私协议</div>
                     <div className={styles.right}>
                         <i className="iconfont icon-youjiantou"></i>
                     </div>
                 </div>
             </div>
         </div>
         {renderRoutes(this.props.route.routes)}
     </div>
    );
  }
}
export default Us